<template>
	<view>
		<ss-select-city v-model="city" :hot-citys="hotCitys" @on-select="onSelectCity" />
	</view>
</template>

<script>
	import ssSelectCity from '@/components/ss-select-city/index.vue'
	export default {
		data() {
			return {
				hotCitys: [
					'杭州',
					'东莞',
					'北京',
					'上海',
					'深圳',
					'广州',
					'成都',
					'重庆',
					'厦门'
				],
				city: ''
			}
		},
		components: {
			ssSelectCity
		},
		onLoad(options) {
			console.log(options)
			this.city = options.city
		},
		methods: {
			onSelectCity(city) {
				wx.setStorageSync('city', this.city)
				
				wx.navigateBack({
					delta: -1,
				})
			}
		}
	}
</script>

<style>
</style>
